package com.xiangge.abstract1;

import com.xiangge.domain.Man;
import com.xiangge.domain.Person;
import com.xiangge.domain.Woman;

public class AbstractTest2 {
    public static void main(String[] args) {
        Person[] all = new Person[2];
        all[0] = new Man();
        all[1] = new Woman();

        for (int i = 0; i < all.length; i++) {
            all[i].pee();
        }
    }
}
